package com.m7788.util;

import java.io.File;
import java.util.Date;

import android.app.AlertDialog;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.os.Environment;

import com.m7788.screen.IndexScreen;
import com.m7788.screen.R;
import com.tool.utils.LogUtil;
import com.tool.utils.LogoutUtil;

public class Constant {
	public static final String KEY_START_320X480 = "KEY_START_320X480";
	public static final String KEY_START_1080X1920 = "KEY_START_1080X1920";
	public static final String KEY_START_1152X1920 = "KEY_START_1152X1920";
	public static final String KEY_START_PAGE = "KEY_START_PAGE";

	public static final String KEY_BANNER_320X480 = "KEY_BANNER_320X480";
	public static final String KEY_BANNER_1080X1920 = "KEY_BANNER_1080X1920";
	public static final String KEY_BANNER_1152X1920 = "KEY_BANNER_1152X1920";
	public static final String KEY_BANNER_PAGE = "KEY_BANNER_PAGE";

	public static final String KEY_BANNER_TIME = "KEY_BANNER_TIME";

	public static final String USERID = "userId";

	//应用是否打开的标识,用于Myreceiver
	public static final String ISON = "isopen";
	
	public static final String APPTAG = "m7788";
	public static final String OPERAFLAG = "backOrForward";

	// BroadcastReciver's action
	public static final String ACTION_STOA = "android.intent.action.stoa";
	public static final String ACTION_PRO = "android.intent.action.probar";
	public static final String ACTION_ATOS = "android.intent.action.atos";

	public static final String SINGLE_TEMP_PHOTO = "stp";
	public static final String IMAGEPATH = "7788Assis/photo";
	public static final String LOCALPATH = "7788Assis/local";
	public static final String shopKeeperId = "shopKeeperId";
	public static final String shopFileId = "shopFileId";
	public static final String fName = "fName";

	public static final String FLAG = "flag";
	public static final String CLOSE_WATER = "needWater";

	public static final String TYPE = "wapActionType";
	public static final String PARAMS = "params";
	public static final String FROM = "wapFrom";
	public static final String USERAGENT = "User-Agent1";
	public static final String REFRESHWEB = "refreshWeb";

	public static final String DefaultFileName = "我的手机图片库";

	public static final String UA = "defaultUa";
	public static final String SinglePhoto = "singlePhoto";
	public static final String CACHE_PATH_NAME = "7788";
	public static final String CACHE_PATH =  Environment.getExternalStorageDirectory().getAbsolutePath()+File.separator+CACHE_PATH_NAME;

	/**
	 * 操作来源 1:来自网页 2：来自本地
	 */
	public static final String OPERATION = "operation";//
	/**
	 * 店主id，本地上传时用到
	 */
	public static final String sid = "SID";

	/**
	 * 上传文件夹id
	 */
	public static final String pid = "PID";

	/**
	 * 本地拍照上传文件夹
	 */
	public static final String Tpid = "TPID";

	/**
	 * 商店名称
	 */
	public static final String shopName = "shopName";

	/**
	 * 图片上传的接口
	 */
	public static final String URL_UPLOAD = "urlUpload";

	private static String URL = "http://ttt.7788.com";

	/**
	 * 登录地址
	 */

	public static String URL_PAY_SHOPER_RESULT = URL
			+ "/mini/pay/99bill/99bill_insert_shoper_soft_m.php";
	public static String URL_PAY_USER_RESULT = URL
			+ "/mini/pay/99bill/99bill_insert_user_soft_m.php";

	public static String URL_LOGIN = URL + "/api/login.php";

	public static final String PAY_LIST_URL_FLAG = "PLU";
	public static String PAY_LIST_SHOPER_URL = URL
			+ "/mini/shopstation/manager/owner_account/huikuang_list.php?"
			+ new Date().getTime();
	public static String PAY_LIST_USER_URL = URL
			+ "/mini/user/account/huikuang_list.php?" + new Date().getTime();
	
	   public static String getURL(){
	    	return URL;
	    }
	public static void setHost(boolean isHttps){
		
		if(isHttps){
			URL = "https://ttt.7788.com";
		}else{
			URL = "http://ttt.7788.com";
		}
		


		URL_PAY_SHOPER_RESULT = URL
				+ "/mini/pay/99bill/99bill_insert_shoper_soft_m.php";
		URL_PAY_USER_RESULT = URL
				+ "/mini/pay/99bill/99bill_insert_user_soft_m.php";

		URL_LOGIN = URL + "/api/login.php";

		PAY_LIST_SHOPER_URL = URL
				+ "/mini/shopstation/manager/owner_account/huikuang_list.php?"
				+ new Date().getTime();
		PAY_LIST_USER_URL = URL
				+ "/mini/user/account/huikuang_list.php?" + new Date().getTime();
		/**
		 * 应用更新地址
		 */
		URL_UPDATE = URL + "/api/devicereport.php?"
				+ new Date().getTime();

		URL_MENU = URL + "/api/menulist.php?"
				+ new Date().getTime();

		URL_TOP_MENU = URL + "/api/menu_top_list.php?"
				+ new Date().getTime();

		URL_ALBUMSCREEN = URL
				+ "/api/albumscreen_list.php?" + new Date().getTime();
		/**
		 * 上传地址和位置设备信息地址
		 */
		URL_APP_INFO = URL + "/api/get_app_info.php";
		
		/**
		 * 获取文件夹目录地址
		 */
		URL_PATH = URL + "/m/api/pathlist.php";
	}
	/**
	 * 应用更新地址
	 */
	public static String URL_UPDATE = URL + "/api/devicereport.php?"
			+ new Date().getTime();

	public static String URL_MENU = URL + "/api/menulist.php?"
			+ new Date().getTime();

	public static String URL_TOP_MENU = URL + "/api/menu_top_list.php?"
			+ new Date().getTime();

	public static String URL_ALBUMSCREEN = URL
			+ "/api/albumscreen_list.php?" + new Date().getTime();
	/**
	 * 上传地址和位置设备信息地址
	 */
	public static String URL_APP_INFO = URL + "/api/get_app_info.php";
	
	/**
	 * 获取文件夹目录地址
	 */
	public static String URL_PATH = URL + "/m/api/pathlist.php";

	public static final String SINGLE_NAME = "singleName";

	public static final String SINGLE_PID = "singlePid";

	/**
	 * 本地单张图片模式 图片旋转角度
	 */
	public static final String SINGLE_DEGREE = "singleDegree";

	/**
	 * 标识是否第一次启动
	 */
	public static final String FIRSTSTART = "firstStart";

	/**
	 * 头部标识以及提示
	 */
	public static final String INDEX_TITLE_LEFT_TEXT_DEFAULT = "itltD";
	public static final String INDEX_TITLE_LEFT_URL_DEFAULT = "itluD";
	public static final String INDEX_TITLE_LEFT_TEXT = "itlt";
	public static final String INDEX_TITLE_LEFT_URL = "itlu";
	public static final String INDEX_TITLE_LEFT_TEXT2 = "itlt2";
	public static final String INDEX_TITLE_LEFT_URL2 = "itlu2";
	public static final String INDEX_TITLE_RIGHT_TEXT = "itrt";
	public static final String INDEX_TITLE_RIGHT_URL = "itru";
	public static final String INDEX_TITLE_RIGHT_NUM = "itrn";

	// 更改目录配置
	public static final String DIRECTORYCONFIG = "directoryConfig";

	public static final String INDEX_MENU = "indexmenu";

	public static final String INDEX_HISTORY_URL = "historyUrl";

	public static final String TEMP_URL = "tempUrl";

	// 支付相关
	public static final String PAY_ORDER_ID = "POI";
	public static final String PAY_AMD = "PA";
	public static final String PAY_MERCHANT_NAME = "PMN";
	public static final String PAY_PROD_NAME = "PPN";
	public static final String PAY_USER_ID = "PUI";
	public static final String PAY_PRICE = "PP";
	public static final String PAY_TOTAL = "PT";
	public static final String PAY_BACK_URL = "PBU";
	public static final String ALBUM_ORDER = "albumOrder";
	
	// 语音跟振动key
	public static final String SOUND_KEY = "SOUND";
	public static final String SHAKE_KEY = "SHAKE";
	public static final String TIME_KEY = "SOUND_TIME";
	public static final String RECORD_KEY = "RECORD_PATH";
	public static final String RECORD_NAME_KEY = "RECORD_NAME";
	
	public static final String CITY = "locality";
	public static final String LONGITUDE = "longitude";
	public static final String COUNTRY = "country";
    public static final String PROVINCE = "administrativeArea";
    public static final String DISTRICT = "subLocality";
    public static final String SZIMEI = "openUDID";
    public static final String LATITUDE = "latitude";
    public static final String OSVERSION = "osVersion";
    public static final String NAME = "name";
    public static final String MACHINEMODELNAME = "machineModelName";
    
    public static boolean sCanHorizontalMove = true;
}
